package com.cloud.order.feign;

import com.cloud.order.feign.fallback.ProductFeignClientFallback;
import com.cloud.product.bean.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @author lx
 * @date 2025/11/11
 * @Description
 */
@FeignClient(name = "service-product", fallback = ProductFeignClientFallback.class)
public interface ProductFeignClient {

    @GetMapping("/product/{id}")
    Product getProduct(@PathVariable("id") Long id ,@RequestHeader("Authorization") String authorization);
}
